<cfset request.repoBrowser = viewstate.getValue("repoBrowser")>
<cfset mySelf = viewState.getValue("mySelf") />
<cfset tree = createObject("component","actionpacks.js.dojo.model.tree.Tree")>
<cfset dataUrl = "?event=repo.treeaction&runaction=true">
<cfsavecontent variable="onClickFunction">
	<cfoutput>
		var daUrl = [itemLink].split("=")[1];
//		alert('#myself#repo.resource.view&resourceUrl='+ daUrl);
		addTab('mainTabContainerPane', daUrl, daUrl, '#myself#repo.resource.view&resourceUrl='+ daUrl, true);
		dojo.widget.byId('resourceHistoryPane').setUrl('#myself#repo.resource.history.view&resourceUrl='+ daUrl);
	</cfoutput>
</cfsavecontent>

<cfoutput><html>
<head>
<style>
.treeRevInfo {
text-decoration:italic;
color:silver;
font-size:75%;
}
</style>
	<script>
	var o = {
	    listen: function(evt){
    	  var currentEl = evt.target;
         if (currentEl.parentNode.nodeName.toLowerCase()=='a') {
         	currentEl = currentEl.parentNode;
         }
          
        // if the onclick came from a "a" link we stop it.
        if( (currentEl.nodeName.toLowerCase()=='a' || currentEl.nodeName.toLowerCase()=='area')
        	&& currentEl.target.toLowerCase() != '_blank'){
            evt.preventDefault(); // stop the link from unloading your page
            if(typeof currentEl.onclick == 'undefined' || currentEl.onclick == null ) {
	           	var daUrl =currentEl.href.split("=")[1];
	           	addTab('mainTabContainerPane', daUrl, daUrl, '#myself#repo.resource.view&resourceUrl='+ daUrl, true);
            }
        }
        if(currentEl.onchange) currentEl.onchange = ''; 
	    }
	}
	
	dojo.addOnLoad(function(){
		dojo.event.connect("revTable", "onclick", o, "listen");
	});	
	dojo.addOnUnload(function(){
		dojo.event.disconnect(dojo.byId("revTable"), "onclick", o, "listen");
	});

</script>

</head>
#tree.outputTrees("pathTree",dataUrl,onClickFunction)#
<a href="/srvinc/fckplugins/connector/filemanager/browser/svn/browser.html?Connector=/?event=repo.fckConnector" target="_blank">Add Files</a>
</div>
</body>
</html></cfoutput>